home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1993 August / 1993-08.d64 / 32 demo (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  57 lines

  1. 100 rem 32 sprites demo
  2. 110 rem
  3. 120 print"[147]":poke53281,0:poke53280,0
  4. 125 ifa=0then a=1:load"32 demo.ml",8,1
  5. 127 ifa=1then a=2:load"32",8,1
  6. 130 rem initialize 32 sprite registers
  7. 135 dim c(10)
  8. 140 y=52992:x=53024:hx=53056:c=53120
  9. 150 p=53216:pr=53275
  10. 160 forj=0to31:pokey+j,0:pokex+j,0:pokehx+j,0:pokec+j,0:pokep+j,14:next
  11. 170 forj=0to63:poke704+j,0:poke832+j,0:poke896+j,0:next
  12. 180 forj=3to59:poke832+j,255:next
  13. 190 pokepr,255:sys 50080:sys 49152:poke53269,255
  14. 200 dt$=""
  15. 210 printleft$(dt$,8);tab(15)"[159]32 [211][208][210][201][212][197][211]"
  16. 220 printtab(9)"[154][195]ustom 32-[211]prite [210]aster"
  17. 230 printtab(15)"[195]ontroller"
  18. 240 print:printtab(9)"[217]ou can display up to 32"
  19. 250 printtab(6)"sprites on the screen at any"
  20. 260 printtab(7)"time. [197]ach sprite can move"
  21. 270 printtab(9)"anywhere on the screen."
  22. 280 forcl=1to10:readc(cl):next:data 8,2,9,10,7,1,7,10,9,2
  23. 290 forj=31to0step-1:pokep+j,13:forcl=1to10:pokec+j,c(cl):next:next
  24. 300 gosub 1010
  25. 310 gosub 1000
  26. 320 printleft$(dt$,12);tab(7)"[217]ou have full control over"
  27. 330 printtab(7)"every sprite option except"
  28. 340 printtab(13)"[217]-expansion."
  29. 350 forj=0to31:pokec+j,int(rnd(1)*15)+1:next:gosub1020
  30. 360 forj=0to31:pokec+j,2:next:gosub1020
  31. 370 forj=0to63:poke832+j,0:next
  32. 375 forj=0to31:a=int(rnd(1)*3)+1:ifa=1thenpp=13
  33. 377 ifa=2thenpp=14
  34. 378 ifa=3thenpp=11
  35. 379 pokep+j,pp:next:cc=85
  36. 380 forj=3to59:poke704+j,int(rnd(1)*256):poke896+j,cc:cc=255-cc:poke832+j,255
  37. 385 next
  38. 390 poke53285,7:poke53286,10
  39. 400 gosub1020:poke53276,255:gosub1020:gosub1020:poke53276,0:gosub1020
  40. 410 forj=0to31:pokep+j,13:next
  41. 420 gosub1020:poke53277,255:gosub1020:poke53277,0
  42. 440 printleft$(dt$,12);tab(5)"[205]ove sprite #1  with joystick"
  43. 450 printtab(2)"in port 2.  [208]ress + and - to change"
  44. 460 printtab(3)"sprite number.  [208]ress [195] to change"
  45. 470 printtab(8)"color. [208]ress [209] to quit."
  46. 480 sys 50272:poke254,0:sp=1
  47. 490 poke254,sp-1:printleft$(dt$,12);tab(18);mid$(str$(sp),2);" "
  48. 500 geta$:ifa$="+"andsp<32thensp=sp+1:goto 490
  49. 510 ifa$="-"andsp>1thensp=sp-1:goto 490
  50. 520 ifa$="c"thenpokec+sp-1,(peek(c+sp-1)+1)and15
  51. 530 ifa$<>"q"then500
  52. 540 poke828,0:sys 828
  53. 999 end
  54. 1000 forj=11to24:poke781,j:sys 59903:next:return
  55. 1010 forj=1to1000:next:return
  56. 1020 forj=1to500:next:return
  57.